package com.ms.p2p.service.impl;

import com.ms.p2p.bean.PageBean;
import com.ms.p2p.dao.RedPacketCategoryDao;
import com.ms.p2p.dao.RedPacketDao;
import com.ms.p2p.entity.redpacket.RedpacketCategory;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by chensk on 2017/11/22.
 */
@Service
public class RedPacketCategoryServiceImpl {
    @Autowired
    RedPacketCategoryDao readPacketCategoryDao;

    public List findPager(PageBean pageBean){
       return  readPacketCategoryDao.findPager(pageBean.getBegin(),pageBean.getPageSize(),null,null);

    }

    public RedpacketCategory get(String id){
        return (RedpacketCategory) readPacketCategoryDao.get(id);
    }
    public int findCount() {
        return readPacketCategoryDao.findCount();
    }

    public int update(RedpacketCategory redpacketCategory) {
        return readPacketCategoryDao.update(redpacketCategory);
    }

    public int insert(RedpacketCategory redpacketCategory) {
        return readPacketCategoryDao.insert(redpacketCategory);
    }

    public void delete(String id) {
        readPacketCategoryDao.delete(id);
    }
}
